home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-12-13 | 602 b | 26 lines | [TEXT/KEEN] |
- # $DeleteFiles : erases/deletes/removes one or more files. Call it
- # what you will, it's permanent so use with caution.
- # Input from "Select input file..." or "MFS selected files" - it's
- # only the file names and locations that matter.
- # stdout contains a brief summary afterwards.
-
- BEGIN {
- DeleteTheFiles();
- print ARGC-1, "files were deleted, no problems."
- }
-
- function DeleteTheFiles( i)
- {
- for (i = 1; i < ARGC; ++i)#note ARGV[0] is just "hAWK"
- {
- if (!remove(ARGV[i]))
- {
- print "Error, could not delete", ARGV[i]
- exit
- }
- print ARGV[i]
- print "\t\twas deleted."
- print ""
- }
- }
-